package com.wanxi.lambda;

public class MyTest {
    public static void main(String[] args) {
//        userInner(new Inner() {
//            @Override
//            public void show() {
//                System.out.println("aaa");
//            }
//        });

//        userInner(() -> System.out.println("aa"));

//        userInner(new InnerAddAgu() {
//            @Override
//            public void show(String name) {
//                System.out.println(name);
//            }
//        });
        userInner((name, age) -> System.out.println(name + age));
        userInner((String name, int age) -> System.out.println(name + age));
    }

    public void aa() {
        for (int i = 0; i < 5; i++)
            System.out.println(i);
        if (1 < 5)
            System.out.println("true");
        else
            System.out.println("false");


    }

    public static void userInner(Inner inner) {
        inner.show();
    }

    public static void userInner(InnerAddAgu inner) {
        inner.show("aaaa", 11);
    }
}
